//
//  ViewController.swift
//  FrameMain
//
//  Created by Burn on 2019/1/15.
//  Copyright © 2019 nmgxysh. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    fileprivate var pageC : BRPageControl?
    override func viewDidLoad() {
        super.viewDidLoad()
        let pageControl = BRPageControl(frame: CGRect (x: 0, y: 100, width: self.view.frame.size.width, height: 20));
        pageControl.currentPageIndicatorTintColor = UIColor.red
        pageControl.hidesForSinglePage = true
        pageControl.pageIndicatorTintColor = UIColor.lightGray
//        pageControl.location = .LocationRight
        pageControl.numberOfPages = 10
        self.view.addSubview(pageControl);
        pageC = pageControl
    }

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        pageC?.currentPage = Int(arc4random() % 4)
//        print(Int(arc4random() % 10))
    }
}

